package server

import (
	"io/ioutil"
	"net/http"
)

const (
	address = "https://ccypovox.api.lncldglobal.com/1.1/classes/haha/5df89779f9c8890009fd7e1a"
)

func LeanServe(w http.ResponseWriter, r *http.Request) {

	clinet := http.Client{}

	req, err := http.NewRequest("GET", address, nil)
	if err != nil {
		w.Write([]byte("system error"))
	}
	req.Header.Set("X-LC-Id", "CcypoVOxgPs9P5WgbF0XwzGg-MdYXbMMI")
	req.Header.Set("X-LC-Key", "sAzCS0PVBNDNwNP4hl9GXrry")
	req.Header.Set("Content-Type", "application/json")

	rp, err := clinet.Do(req)

	bodyRlt, _ := ioutil.ReadAll(rp.Body)
	r.Body.Close()

	w.Write(bodyRlt)

}
